package com.parking.user.client.inter;

import com.parking.common.core.model.Result;
import com.parking.user.client.dto.UserOrderDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Feign接口调用 订单模块
 * */
@FeignClient(name="parking-order",path = "/order")
public interface UserOrderClient {
    /**
     * 根据用户车辆Id查询关联订单
     * 参数: 用户车辆ID userCarId
     * 返回: List<UserOrderDto> 正在使用的用户订单Id 已取消和已完成的不要
     *      orderInfoId 订单Id
     *      orderInfoNum 订单编号
     * */
    @GetMapping("/orderInfo/selectUserOrderByUserCarId")
    Result<List<UserOrderDto>> selectUserOrderByUserCarId(@RequestParam("userCarId") Integer userCarId);
}
